<script lang="ts" setup>
import type { BadgeProps } from "vant";
const props = withDefaults(
  defineProps<{
    name?: string;
    dot?: boolean;
    badge?: StrNumber;
    badgeProps?: BadgeProps;
    color?: string;
    size?: StrNumber;
    classPrefix?: string;
    tag?: string;
    rName?: string;
  }>(),
  {
    tag: "i",
    classPrefix: "icon",
    color: "inherit",
  }
);
const $rName = computed(() => {
  return props.rName?.replace(/^icon-/, "");
});
</script>

<template>
  <van-icon class="Ricon" v-bind="(props as any)" :name="$rName || props.name">
  </van-icon>
</template>

<style lang="less" scoped>
.Ricon {
  font-family: "iconfont" !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
